package com.excilys.webservice.soap;

import javax.jws.WebService;

import org.springframework.beans.factory.annotation.Autowired;

import com.excilys.service.TransferFormService;

/**
 * Class that implements JAX-WS writing transaction transfer WebService. 
 * Persists a transaction transfer.
 * 
 * @author excilys dev : YA
 * 
 */
@WebService(endpointInterface = "com.excilys.webservice.soap.ITransactionTransferWebService")
public class TransactionTransferWebServiceImpl implements ITransactionTransferWebService {

	@Autowired
	private TransferFormService transactionTransferService;

	@Override
	public void persistTransferTransaction(String sourceAccountName, String targetAccountName, double transferAmount) {
		transactionTransferService.persistOneTransfer(sourceAccountName, targetAccountName, transferAmount);
	}
}
